package cn.gson.springboot.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the warehousing_audit_yk database table.
 * 
 */
@Entity
@Table(name="warehousing_audit_yk")
@NamedQuery(name="WarehousingAuditYk.findAll", query="SELECT w FROM WarehousingAuditYk w")
public class WarehousingAuditYk implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="audit_id")
	private int auditId;

	@Column(name="audit_qualified")
	private String auditQualified;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="audit_time")
	private Date auditTime;

	//bi-directional many-to-one association to WarehousingAuditDetailsYk
	@OneToMany(mappedBy="warehousingAuditYk")
	private List<WarehousingAuditDetailsYk> warehousingAuditDetailsYks;

	//bi-directional many-to-one association to DrugPurchaseYk
	@ManyToOne
	@JoinColumn(name="purchase_id")
	private DrugPurchaseYk drugPurchaseYk;

	public WarehousingAuditYk() {
	}

	public int getAuditId() {
		return this.auditId;
	}

	public void setAuditId(int auditId) {
		this.auditId = auditId;
	}

	public String getAuditQualified() {
		return this.auditQualified;
	}

	public void setAuditQualified(String auditQualified) {
		this.auditQualified = auditQualified;
	}

	public Date getAuditTime() {
		return this.auditTime;
	}

	public void setAuditTime(Date auditTime) {
		this.auditTime = auditTime;
	}

	public List<WarehousingAuditDetailsYk> getWarehousingAuditDetailsYks() {
		return this.warehousingAuditDetailsYks;
	}

	public void setWarehousingAuditDetailsYks(List<WarehousingAuditDetailsYk> warehousingAuditDetailsYks) {
		this.warehousingAuditDetailsYks = warehousingAuditDetailsYks;
	}

	public WarehousingAuditDetailsYk addWarehousingAuditDetailsYk(WarehousingAuditDetailsYk warehousingAuditDetailsYk) {
		getWarehousingAuditDetailsYks().add(warehousingAuditDetailsYk);
		warehousingAuditDetailsYk.setWarehousingAuditYk(this);

		return warehousingAuditDetailsYk;
	}

	public WarehousingAuditDetailsYk removeWarehousingAuditDetailsYk(WarehousingAuditDetailsYk warehousingAuditDetailsYk) {
		getWarehousingAuditDetailsYks().remove(warehousingAuditDetailsYk);
		warehousingAuditDetailsYk.setWarehousingAuditYk(null);

		return warehousingAuditDetailsYk;
	}

	public DrugPurchaseYk getDrugPurchaseYk() {
		return this.drugPurchaseYk;
	}

	public void setDrugPurchaseYk(DrugPurchaseYk drugPurchaseYk) {
		this.drugPurchaseYk = drugPurchaseYk;
	}

}